package io;

import java.io.*;

/**
 * Created by GodRUI on 2021/8/28 16:25
 */
public class FileInputStream_1 {

    public static void main(String[] args) throws IOException {
        String path = "data/pubg壁纸.jpg";
        String path1 = "data/pubg壁纸1.jpg";

        BufferedInputStream bi = new BufferedInputStream(new FileInputStream(path));
        BufferedOutputStream bo = new BufferedOutputStream(new FileOutputStream(path1));

        byte[] bytes = new byte[1024];
        int len;
        while ((len = bi.read(bytes)) != -1){

            bo.write(bytes,0,len);

        }

        bi.close();
        bo.close();

    }



}
